﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HPIT.RentHouse.Common;
using HPIT.RentHouse.DTO;

namespace HPIT.RentHouse.IService
{
    public interface IHouseService:IServiceSupport
    {
        /// <summary>
        /// 获取房源列表
        /// </summary>
        /// <param name="communityName"></param>
        /// <param name="typeId"></param>
        /// <param name="start"></param>
        /// <param name="length"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        List<HouseDTO> GetHouseList(string communityName, int start, int length, ref int totalCount);
        /// <summary>
        /// 获取房源附属设施
        /// </summary>
        /// <returns></returns>
        List<AttachmentDTO> GetAttachmentList();
        /// <summary>
        /// 添加房源
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        AjaxResult AddHouse(HouseAddDTO dto);
        /// <summary>
        /// 上传图片
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        AjaxResult AddPic(HousePicDTO dto);
        /// <summary>
        /// 查看图片
        /// </summary>
        /// <returns></returns>
        List<HousePicDTO> GetHousePics(long lookid);
        /// <summary>
        /// 批量删除图片
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        AjaxResult DeleteBatchPics(List<long> picId);
        /// <summary>
        /// 删除房源
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        AjaxResult Delete(long id);
        /// <summary>
        /// 批量删除房源
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        AjaxResult DeleteBatch(List<long> ids);
        /// <summary>
        /// 获取房源列表(前端页面数据展示)
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="cityId"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        List<HouseDTO> GetHouseList(int pageIndex,int cityId,int pageSize);
        /// <summary>
        /// 根据条件搜索符合条件的房源信息
        /// </summary>
        /// <param name="options"></param>
        /// <returns></returns>
        List<HouseDTO> Search(HouseSearchOptions options);
        /// <summary>
        /// 房源详情
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        HouseDetailDTO GetHouseDetail(long id); 
    }
}
